﻿<navigation:Page x:Class="AR.EntretienTechnique" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
           xmlns:ViewModels="clr-namespace:AR.ViewModels"
           xmlns:local="clr-namespace:AR.Model"
           xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" xmlns:Entities="clr-namespace:AR.Entities" xmlns:Services="clr-namespace:AR.Web.Services"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
             
           d:DesignWidth="640" d:DesignHeight="2800"
           Title="Entretien Technique Orale">
    <navigation:Page.Resources>
   
        <sdk:HierarchicalDataTemplate x:Key="ChoixTemplate" DataType="Entities:CHOIX" ItemsSource="{Binding CHOIX}">
            <StackPanel Orientation="Horizontal" >
                <CheckBox  Tag="{Binding Path=IDCHOIX}" x:Name="CHOIX" IsChecked="{Binding Path=IsChecked,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,TargetNullValue=False}" Command="{Binding ClickChoixCommand}"/>
                <TextBlock Text="{Binding Path=CHOIX1}" />
            </StackPanel>
        </sdk:HierarchicalDataTemplate>
        <sdk:HierarchicalDataTemplate x:Key="QuestionTemplate" DataType="Entities:QUESTIONS" ItemsSource="{Binding CHOIX}" ItemTemplate="{StaticResource ChoixTemplate}">
            <TextBlock  Style="{StaticResource QuestionsStyle}" Text="{Binding Path=QUESTION}" />
        </sdk:HierarchicalDataTemplate>
        <sdk:HierarchicalDataTemplate x:Key="ThemeTemplate" DataType="Entities:THEME" ItemsSource="{Binding QUESTIONS}" ItemTemplate="{StaticResource QuestionTemplate}">
            <TextBlock Style="{StaticResource ThemesStyle}" Text="{Binding Path=THEME_INTITULE}" />
        </sdk:HierarchicalDataTemplate>
    </navigation:Page.Resources>
    <Grid x:Name="LayoutRoot"  >
        <Grid.RowDefinitions>
            <RowDefinition MinHeight="100" />
            <RowDefinition Height="*"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>        
        <sdk:Label HorizontalAlignment="Left" Height="28" Margin="10,10,0,0" VerticalAlignment="Top" Name="lbl0" Width="auto" Content="Temps écoulé: " FontSize="24" FontWeight="Bold" Foreground="#FF184491" />

        <sdk:Label Height="28" Width="auto" Margin="220,10,0,0" VerticalAlignment="Top" Name="lbl1" Content="{Binding Timer}" FontSize="24" FontWeight="Bold" Foreground="#FF184491" />

        <sdk:TreeView 
     ItemsSource="{Binding Themes}" ItemTemplate="{StaticResource ThemeTemplate}"  Grid.Row="1" />
        <HyperlinkButton Grid.Row="2" Content="Terminer"  Height="48" Style="{StaticResource ButtonStyle}"  Command="{Binding EndtestCommand}"/>
        
    </Grid>
</navigation:Page>
